package com.aaa.stock.controller.prod;

import com.aaa.entity.DictData;
import com.aaa.stock.service.prod.StoDictDataService;
import com.aaa.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/stock/prod/dict/data")
public class StoDictDataController {

    @Autowired
    private StoDictDataService stoDictDataService;

    @GetMapping("findByType/{type}")
    public Result<List<DictData>> list(@PathVariable String type){
        return stoDictDataService.findByType(type);
    }
}
